// 2022/6/9

const fs = require('fs');

try {
  // Create a stream from some character device.
  const stream = fs.createReadStream('./a.txt');
  stream.on('error', () => {
    console.error('Hey, caught you!');
  });
} catch (err) {
  console.error('Oh, error');
}


